Skip to content

feat: Improve barretenberg headers#201

Merged
dbanks12 merged 10 commits into
masterfrom
phated/headers
Mar 9, 2023
Merged

feat: Improve barretenberg headers#201
dbanks12 merged 10 commits into
masterfrom
phated/headers

Conversation

@phated

@phated phated commented Mar 6, 2023

Copy link
Copy Markdown

Description

This PR does a few things:

  1. Renames cpp/src/aztec to cpp/src/barretenberg, which will align the installed headers to match the libbarretenberg library that will get installed by feat: Add installation targets for libbarretenberg, wasm & headers #185
  2. Moves cpp/src/aztec/CMakeLists.txt to cpp/src/CMakeLists.txt which allows all header files to be prefixed with the barretenberg namespace. This ensures that header includes when building the project are the same as when installed.
  3. Updates all the header includes to use that barretenberg/ prefix.
  4. Updates all local includes to use double-quotes instead of angle brackets. Generally, angle-brackets should only be used for system libraries and double-quotes should be used for user-defined headers. This also surfaces a lot of unnecessary or incorrect includes via clangd but I didn't want to change any of those in this PR.
  5. Lots of clang-format changes since I touched files and it updates the entire file whenever one is staged.

Checklist:

  • I have reviewed my diff in github, line by line.
  • Every change is related to the PR description.
  • I have linked this pull request to the issue(s) that it resolves.
  • There are no unexpected formatting changes, superfluous debug logs, or commented-out code.
  • There are no circuit changes, OR specifications in /markdown/specs have been updated.
  • There are no circuit changes, OR a cryptographer has been assigned for review.
  • I've updated any terraform that needs updating (e.g. environment variables) for deployment.
  • The branch has been rebased against the head of its merge target.
  • I'm happy for the PR to be merged at the reviewer's next convenience.
  • New functions, classes, etc. have been documented according to the doxygen comment format. Classes and structs must have @brief describing the intended functionality.
  • If existing code has been modified, such documentation has been added or updated.

@kevaundray kevaundray requested review from dbanks12 and removed request for codygunton March 8, 2023 14:55
@dbanks12

dbanks12 commented Mar 8, 2023

Copy link
Copy Markdown

Looks mostly good to me. We should ping the crypto team letting them know about this PR because it will likely break people's branches. But I do think this is a good change.

It might make sense to move some of the C++ formatting changes into a separate PR, but I don't feel strongly either way.

@phated

phated commented Mar 8, 2023

Copy link
Copy Markdown
Author

The formatting changes happened because I moved the files and the git hook applies to all files that are staged (see #192). I think it's fine to format them so all formatting is consistent as per the git hook.

@dbanks12 dbanks12 merged commit 4e03839 into master Mar 9, 2023
@dbanks12 dbanks12 deleted the phated/headers branch March 9, 2023 18:47
ludamad pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jul 22, 2023
* fix!: Move the include root up 1 directory & rename aztec to barretenberg

* chore: Use quote includes instead of angle brackets
ludamad pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jul 24, 2023
* fix!: Move the include root up 1 directory & rename aztec to barretenberg

* chore: Use quote includes instead of angle brackets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants